package com.lzh.shijicloudstack.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lzh.shijicloudstack.model.entity.CookbookIngredient;
import com.lzh.shijicloudstack.model.vo.ingredient.IngredientVO;

import java.util.List;


/**
 * 菜谱表数据库访问层
 *
 * @author luzhiheng
 * @since 2025-01-12
 */
public interface CookbookIngredientMapper extends BaseMapper<CookbookIngredient> {

    /**
     * 根据菜谱id查询菜谱中的所有菜品
     *
     * @param cookbookId 菜谱id
     * @return List<CookbookIngredient>
     */
    List<IngredientVO> selectByCookbookId(Long cookbookId);

    /**
     * 根据菜谱id删除菜谱中的所有菜品
     *
     * @param cookbookId 菜谱id
     */
    void deleteByCookbookId(Long cookbookId);
}
